package org.cloud.controller;

import lombok.RequiredArgsConstructor;
import org.cloud.apis.AliPaymentFeign;
import org.cloud.response.ResultData;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: PaySentinelController
 * Package: org.cloud.controller
 * Description:
 *
 * @Author: @weixueshi
 * @Create: 2024/4/14 - 15:35
 * @Version: v1.0
 */
@RestController
@RequiredArgsConstructor
public class ConsumerPaySentinelController {

    private final AliPaymentFeign aliPaymentFeign;

    @GetMapping("/consumer/pay/sentinel/get/{orderNo}")
    public ResultData getPayment(@PathVariable("orderNo") String orderNo){
        return aliPaymentFeign.getPayByOrderNo(orderNo);
    }
}
